package ae.pcfc.cldos.online.web.controller.reports.home;

import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;

import javax.servlet.ServletContext;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;

import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JRExporter;
import net.sf.jasperreports.engine.JRExporterParameter;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.data.JRTableModelDataSource;
import net.sf.jasperreports.engine.design.JasperDesign;
import net.sf.jasperreports.engine.export.JRHtmlExporter;
import net.sf.jasperreports.engine.export.JRHtmlExporterParameter;
import net.sf.jasperreports.engine.export.JRPdfExporter;
import net.sf.jasperreports.engine.export.JRPdfExporterParameter;
import net.sf.jasperreports.engine.export.JRXlsExporter;
import net.sf.jasperreports.engine.export.JRXlsExporterParameter;
import net.sf.jasperreports.engine.util.JRLoader;
import net.sf.jasperreports.engine.xml.JRXmlLoader;

import org.apache.commons.io.output.ByteArrayOutputStream;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.servlet.ModelAndView;

import ae.pcfc.cldos.online.common.delegate.CompanyInformationDelegate;
import ae.pcfc.cldos.online.common.delegate.FnpGSDelegate;
import ae.pcfc.cldos.online.common.delegate.ReportDelegate;
import ae.pcfc.cldos.online.common.etksdb.domain.Client;
import ae.pcfc.cldos.online.common.etksdb.domain.User;
import ae.pcfc.cldos.online.common.exception.GSAppException;
import ae.pcfc.cldos.online.common.exception.NoSuchCompanyException;
import ae.pcfc.cldos.online.common.tscdb.domain.TTscClientCompany;
import ae.pcfc.cldos.online.common.vo.CompanyInformationVO;
import ae.pcfc.cldos.online.common.vo.ReportRequestVO;
import ae.pcfc.cldos.online.common.vo.UserVO;
import ae.pcfc.cldos.online.common.vo.report.ReportApplicationVO;
import ae.pcfc.cldos.online.common.vo.tasks.TaskRequestParamsVO;
import ae.pcfc.cldos.online.fnp.service.client.vo.FNPReportResponseVO;
import ae.pcfc.cldos.online.report.service.vo.EmployeeMasterReportReqVO;
import ae.pcfc.cldos.online.report.service.vo.EmployeeMasterReportResponseVO;
import ae.pcfc.cldos.online.report.service.vo.EmployeeTransactionMasterReportResponseVO;
import ae.pcfc.cldos.online.report.service.vo.EmployeeTransactionReportReqVO;
import ae.pcfc.cldos.online.web.Constants;
import ae.pcfc.cldos.online.web.ViewPath;
import ae.pcfc.cldos.online.web.controller.base.BaseNewVisaController;
import ae.pcfc.cldos.online.web.controller.base.BasePageController;
import ae.pcfc.cldos.online.web.model.CompanyInformationModel;
import ae.pcfc.cldos.online.web.model.ReportsInfo;

/**
 * Controller that handles all report requests
 * 
 * @author Asna
 */
@Controller
@RequestMapping(value = ViewPath.__REPORTS_HOME)
public class ReportsHomeController extends BaseNewVisaController implements JRExporter {

	@InitBinder
	public void initBinder(WebDataBinder binder, Locale locale) {
	}
	
	@Autowired
	@Qualifier("companyInformationDelegate")
	private CompanyInformationDelegate companyInformationDelegate;
	
	@Autowired
	@Qualifier("FnpGSDelegate")
	private FnpGSDelegate FnpGSDelegate;
	
	@Autowired
	@Qualifier("reportDelegate")
	private ReportDelegate reportDelegate;
	
	private static final String REPORTS_HOME_VIEW_PATH = "reports.home.show";
	SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");

	@RequestMapping(value = "/show.htm", method = RequestMethod.GET)
	public ModelAndView show(
			HttpServletRequest request,
			ModelMap model,
			@ModelAttribute(value = Constants.__REPORTS_HOME_INFO_REQUEST_MODEL_KEY) ReportsInfo reportsInfo) {

		return new ModelAndView(REPORTS_HOME_VIEW_PATH);
	
	}
	/* (non-Javadoc)
	 * @see ae.pcfc.cldos.online.web.controller.base.BaseController#getUserVO()
	 */
	protected UserVO getUserVO(){
		UserVO userVO = new UserVO();
		userVO.setUsername(securityService.getLoginedUsername());
		userVO.setEmployee(securityService.isCompanyEmployee());
		userVO.setAdmin(securityService.isCompanyAdmin());
		userVO.setGeneralAdmin(securityService.isGeneralAdmin());
		userVO.setGeneralAdmin(true); //:TODO we need general admin account for document and data validation
		return userVO;
	}
	
	/**
	 * @param request
	 * @param status
	 * @param financeServicesInfo
	 * @param errors
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(method = RequestMethod.POST, value = "/show.htm")
	public void show(
			HttpServletRequest request,HttpServletResponse response,
			SessionStatus status,
			@ModelAttribute(value = Constants.__REPORTS_HOME_INFO_REQUEST_MODEL_KEY) @Valid ReportsInfo reportsInfo,
			BindingResult errors) throws Exception {
		
		Date dateFrom = reportsInfo.getDateFrom();
		Date dateTo = reportsInfo.getDateTo();
		String selectedReport = reportsInfo.getSelectedReport();
		String reportType = reportsInfo.getReportType();
		String fileName=null;
		String fileExtension=null;
	
		//generate PDF or Excel report
		if(reportType.equals("PDF")){
			response.setContentType("application/pdf");
			fileExtension=".pdf";
		}else{
			response.setContentType("application/vnd.ms-excel");
			reportType = "XLSX";
			fileExtension=".xlsx";
		}
		
		//generate actual or reserved account report
		FNPReportResponseVO fnpReportResponseVO = null;
		if(selectedReport.equals("0")){
			 fnpReportResponseVO = reportDelegate.generateClientAccountReport(securityService.getLoginedUsername(), dateFrom, dateTo, reportType, true);
			 fileName = "PrepaidActualAccountReport";
		}else if(selectedReport.equals("1")){
			 fnpReportResponseVO = reportDelegate.generateClientAccountReport(securityService.getLoginedUsername(), dateFrom, dateTo, reportType, false);
			 fileName = "PrepaidReservedAccountReport";
		}
		
		if(selectedReport.equals("0") || selectedReport.equals("1")){
			//write to stream
			ByteArrayOutputStream baos = new ByteArrayOutputStream();
			baos.write(fnpReportResponseVO.getReportPDF()); 
			response.setContentLength(baos.size());
			response.setHeader("Content-disposition","attachment;filename="+fileName+fileExtension);
	        ServletOutputStream sos = response.getOutputStream();
	        baos.writeTo(sos);
	        sos.flush();
	        baos.flush();
	        sos.close();
	        baos.close();
		}
		else{
			ByteArrayOutputStream baos = new ByteArrayOutputStream();
			ServletContext application = request.getSession().getServletContext();
			String filepath = null;
			
			Map<String, String> parameters = getGeneralParametersforReport(selectedReport, reportsInfo.getTransactionDateFrom(), reportsInfo.getTransactionDateTo());
			String logo = application.getRealPath("WEB-INF/reports/TrakheesLogo.gif"); 
			parameters.put("logo", logo);
			
			JRTableModelDataSource jrTableModelDataSource = null;
		/*	CustomTableTransactionModel  cusModel = new CustomTableTransactionModel();
			int i=0;
			Object[][] data = null;
			data = new Object[1][14]; 
			for(int j=0; j<14;j++){
				data[i][j] = Constants.__REPORT_NO_DATA;
			}
			cusModel.setData(data);
			jrTableModelDataSource = new JRTableModelDataSource(cusModel);*/
			if(reportsInfo.getSelectedReport().equals("2")){
				filepath = application.getRealPath("WEB-INF/reports/clientmaster.jrxml"); 
				parameters = getParametersforEmployeeMasterReport(parameters);
				EmployeeMasterReportReqVO  employeeMasterReportReqVO = new EmployeeMasterReportReqVO();
				employeeMasterReportReqVO.setEmployeeStatus(reportsInfo.getEmpStatus());
				employeeMasterReportReqVO.setEpExpiryDateFrom(reportsInfo.getEpExpiryDateFrom());
				employeeMasterReportReqVO.setEpExpiryDateTo(reportsInfo.getEpExpiryDateTo());
				employeeMasterReportReqVO.setRpExpiryDateFrom(reportsInfo.getRpExpiryDateFrom());
				employeeMasterReportReqVO.setRpExpiryDateTo(reportsInfo.getRpExpiryDateTo());
				employeeMasterReportReqVO.setNationality(reportsInfo.getNationality());
				employeeMasterReportReqVO.setName(reportsInfo.getEmpName());
				employeeMasterReportReqVO.setPassportNumber(reportsInfo.getPassportNo());
				employeeMasterReportReqVO.setCompanyLicenseNo(parameters.get("licno"));
				jrTableModelDataSource = new JRTableModelDataSource(getEmployeeMasterData(employeeMasterReportReqVO));
			}
			else{
				filepath = application.getRealPath("WEB-INF/reports/transactionreportexcel.jrxml"); 
				EmployeeTransactionReportReqVO  employeeTransactionReportReqVO = new EmployeeTransactionReportReqVO();
				employeeTransactionReportReqVO.setTransactionDateFrom(reportsInfo.getTransactionDateFrom());
				employeeTransactionReportReqVO.setTransactionDateTo(reportsInfo.getTransactionDateTo());
				employeeTransactionReportReqVO.setTransactionStatus(reportsInfo.getTransactionStatus());
				employeeTransactionReportReqVO.setCandidateName(reportsInfo.getCandidateName());
				employeeTransactionReportReqVO.setProcessCode(reportsInfo.getProcessName());
				employeeTransactionReportReqVO.setTransactionNumber(reportsInfo.getTransactionNo());
				employeeTransactionReportReqVO.setCompanyLicenseNo(parameters.get("licno"));
				jrTableModelDataSource = new JRTableModelDataSource(getEmployeeTransactionReportData(employeeTransactionReportReqVO));
			}
			JasperDesign jasperDesign = JRXmlLoader.load(filepath);
			JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
			
			/*filepath = application.getRealPath("WEB-INF/reports/transactionreportexcel1.jasper"); 
			JasperReport jasperReport = (JasperReport)JRLoader.loadObject(filepath);
			*/
			//fillReportToFile(jasperReport, parameters, jrTableModelDataSource);
			JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, jrTableModelDataSource);
	
			//show report
			if(request.getParameter("action")!=null){
				JRHtmlExporter exporterhtml = new JRHtmlExporter();
				exporterhtml.setParameter(JRHtmlExporterParameter.JASPER_PRINT,jasperPrint);
				exporterhtml.setParameter(JRHtmlExporterParameter.OUTPUT_STREAM,baos);
		        exporterhtml.setParameter(JRHtmlExporterParameter.IS_WHITE_PAGE_BACKGROUND,Boolean.TRUE);
		        exporterhtml.setParameter(JRHtmlExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS,Boolean.TRUE);
		        exporterhtml.setParameter(JRHtmlExporterParameter.IGNORE_PAGE_MARGINS,Boolean.TRUE);
		        exporterhtml.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN,Boolean.FALSE);
				exporterhtml.exportReport();
				response.setContentType("text/html");
			}else{
				//export report
				String fName=null;
		        
				if(reportsInfo.getReportType().equals("Excel")){
					JRXlsExporter exporterXLS = new JRXlsExporter();
			        exporterXLS.setParameter(JRXlsExporterParameter.JASPER_PRINT,jasperPrint);
			        exporterXLS.setParameter(JRXlsExporterParameter.OUTPUT_STREAM,baos);
			        exporterXLS.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND,Boolean.TRUE);
					exporterXLS.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS,Boolean.FALSE);
					exporterXLS.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS,Boolean.FALSE);
					exporterXLS.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET,Boolean.TRUE);
					exporterXLS.setParameter(JRXlsExporterParameter.IGNORE_PAGE_MARGINS,Boolean.TRUE);
					
			        exporterXLS.exportReport();
			        
			    	fName="Status"+".xls";
			  		response.setContentType("application/vnd.ms-excel");
			        
				}else{
					JRPdfExporter exporterPDF = new JRPdfExporter();
					exporterPDF.setParameter(JRPdfExporterParameter.JASPER_PRINT,jasperPrint);
					exporterPDF.setParameter(JRPdfExporterParameter.OUTPUT_STREAM,baos);
					exporterPDF.setParameter(JRPdfExporterParameter.PDF_JAVASCRIPT, "this.zoom = 100;");
					exporterPDF.exportReport();
			        
			  		fName=""+parameters.get("reportname")+".pdf";
			  		response.setContentType("application/pdf");
				}
		  		response.setHeader("Content-disposition","attachment;filename="+fName);
			}
	  		response.setContentLength(baos.size());
	        ServletOutputStream sos = response.getOutputStream();
	        baos.writeTo(sos);
	        sos.flush();
	        baos.flush();
	        sos.close();
	        baos.close();
			
		}
	
	}
	

	
	/**
	 * @param dateFrom
	 * @param dateTo
	 * @param selectedReport
	 * @return
	 */
	private CustomTableModel getStatusReportData(String selectedReport, Date dateFrom, Date dateTo){
		TaskRequestParamsVO taskRequestParamsVO = new TaskRequestParamsVO();
		if(dateFrom!=null){
			taskRequestParamsVO.setDateFrom(dateFrom.toString());
		}
		if(dateTo!=null){
			taskRequestParamsVO.setDateTo(dateTo.toString());
		}
		taskRequestParamsVO.setServiceName(selectedReport);
		//call dom
		//call dom
		ReportRequestVO reportRequestVO = new ReportRequestVO();
		reportRequestVO.setUserVO(getUserVO());
		
		reportRequestVO.setTaskRequestParamsVO(taskRequestParamsVO);
		List<ReportApplicationVO> reportApplicationVOs = reportDelegate.getApplicationList(reportRequestVO);
		
		CustomTableModel cusModel = new CustomTableModel();
		int i=0;
		Object[][] data = null;
		if(reportApplicationVOs!=null && reportApplicationVOs.size()!=0){
			data = new Object[reportApplicationVOs.size()][7]; 
			for(ReportApplicationVO reportApplicationVO :reportApplicationVOs){
				data[i][0]=(reportApplicationVO.getApplicationId().toString());
				data[i][1]=(formatter.format(reportApplicationVO.getApplicationDate()));
				if(reportApplicationVO.getUserId()!=null){
					data[i][2]=(reportApplicationVO.getUserId().toString());
				}else{
					data[i][2]=null;
				}
				data[i][3]=(reportApplicationVO.getWfInitiatedBy());
				data[i][4]=(reportApplicationVO.getStatusDesc());
				data[i][5]=(reportApplicationVO.getWfIncidentId());
				data[i][6]=(reportApplicationVO.getPaymentAdviceNo());
				i++;
			}
		}else{
			data = new Object[1][7]; 
			for(int j=0; j<7;j++){
				data[i][j] = Constants.__REPORT_NO_DATA;
			}
		}
		cusModel.setData(data);
		return cusModel;
	}
	/**
	 * @param parameters
	 * @return
	 */
	private Map<String, String> getParametersforEmployeeMasterReport(Map<String, String> parameters){

		CompanyInformationModel companyInformationModel = new CompanyInformationModel();
		CompanyInformationVO companyInformationVO=null;
		try{
			companyInformationVO = companyInformationDelegate.retriveGSInformation(getUserVO());
			mapper.map(companyInformationVO, companyInformationModel);
		}catch(NoSuchCompanyException e){
			companyInformationModel.setCompanyError(true);
		}catch(GSAppException e){
			companyInformationModel.setGsError(true);
		}
	
		//report colum parameters
		parameters.put("actual", companyInformationModel.getActualEmplyeesNum());
		parameters.put("allowed", companyInformationModel.getAllowed());
		parameters.put("male", companyInformationModel.getMale());
		parameters.put("female", companyInformationModel.getFemale());
		parameters.put("vacant", companyInformationModel.getVacant());
		parameters.put("nonspon", companyInformationModel.getNonSponsored());
		parameters.put("visitvisa", companyInformationModel.getVisitor());
		parameters.put("bgflag", companyInformationModel.getBgFlag());
		parameters.put("bgreq", companyInformationModel.getBgRequired());
		parameters.put("bgbal", companyInformationModel.getBankGuaranteeBalance());
		parameters.put("bgpaid", companyInformationModel.getBgPaid());
		parameters.put("medtype", companyInformationModel.getMedicalType());
		return parameters;
	}
	/**
	 * @param dateFrom
	 * @param dateTo
	 * @param selectedReport
	 * @return
	 */
	private CustomTableModel getEmployeeMasterData(EmployeeMasterReportReqVO  employeeMasterReportReqVO){
		
		List<EmployeeMasterReportResponseVO> employeeMasterReportResponseVOs = reportDelegate.getEmployeeMasterReportData(employeeMasterReportReqVO);
		
		CustomTableModel cusModel = new CustomTableModel();
		int i=0;
		Object[][] data = null;
		if(employeeMasterReportResponseVOs!=null && employeeMasterReportResponseVOs.size()!=0){
			data = new Object[employeeMasterReportResponseVOs.size()][12]; 
			for(EmployeeMasterReportResponseVO employeeMasterReportResponseVO :employeeMasterReportResponseVOs){
				data[i][0]=new Integer(i).toString();
				data[i][1]=(employeeMasterReportResponseVO.getCecNo());
				data[i][2]=(employeeMasterReportResponseVO.getEmployeeStatus());
				data[i][3]=(employeeMasterReportResponseVO.getName());
				data[i][4]=(employeeMasterReportResponseVO.getPositionHeld());
				data[i][5]=(employeeMasterReportResponseVO.getPassportNumber());
				data[i][6]=(employeeMasterReportResponseVO.getEntryPermitNumber());
				data[i][7]=(employeeMasterReportResponseVO.getResidencePermitNumber());
				data[i][8]=(employeeMasterReportResponseVO.getEntryPermitExpiryDate());
				data[i][9]=(employeeMasterReportResponseVO.getResidencePermitExpiryDate());
				data[i][10]=(employeeMasterReportResponseVO.getNationality());
				data[i][11]=(employeeMasterReportResponseVO.getWfStatus());
				i++;
			}
		}else{
			data = new Object[1][12]; 
			for(int j=0; j<12;j++){
				data[i][j] = Constants.__REPORT_NO_DATA;
			}
		}
		cusModel.setData(data);
		return cusModel;
	}
	
	/**
	 * @param employeeMasterReportReqVO
	 * @return
	 */
	private CustomTableTransactionModel getEmployeeTransactionReportData(EmployeeTransactionReportReqVO employeeTransactionReportReqVO){
		
		List<EmployeeTransactionMasterReportResponseVO> employeeTransactionMasterReportResponseVOs = reportDelegate.getEmployeeTransactionReportData(employeeTransactionReportReqVO,securityService.getLoginedUsername());
		
		CustomTableTransactionModel  cusModel = new CustomTableTransactionModel();
		int i=0;
		Object[][] data = null;
		if(employeeTransactionMasterReportResponseVOs!=null && employeeTransactionMasterReportResponseVOs.size()!=0){
			data = new Object[employeeTransactionMasterReportResponseVOs.size()][14]; 
			for(EmployeeTransactionMasterReportResponseVO employeeTransactionMasterReportResponseVO :employeeTransactionMasterReportResponseVOs){
				data[i][0]=new Integer(i).toString();
				data[i][1]=(employeeTransactionMasterReportResponseVO.getTransactionNumber());
				data[i][2]=(employeeTransactionMasterReportResponseVO.getIncidentNumber());
				data[i][3]=(employeeTransactionMasterReportResponseVO.getCandidateName());
				data[i][4]=(employeeTransactionMasterReportResponseVO.getCecNumber());
				data[i][5]=(employeeTransactionMasterReportResponseVO.getProcessName());
				data[i][6]=(employeeTransactionMasterReportResponseVO.getTransactionStatusDesc());
				//data[i][7]=(employeeTransactionMasterReportResponseVO.get);
				data[i][8]=(Constants.__NOT_APPLICABLE);
				data[i][9]=(Constants.__NOT_APPLICABLE);
				data[i][10]=(Constants.__NOT_APPLICABLE);
				data[i][11]=(Constants.__NOT_APPLICABLE);
				data[i][12]=(Constants.__NOT_APPLICABLE);
				data[i][13]=(Constants.__NOT_APPLICABLE);
				i++;
			}
		}else{
			data = new Object[1][14]; 
			for(int j=0; j<14;j++){
				data[i][j] = Constants.__REPORT_NO_DATA;
			}
		}
		cusModel.setData(data);
		return cusModel;
	}
	/**
	 * @param selectedReport
	 * @param dateFrom
	 * @param dateTo
	 * @return
	 */
	private Map<String, String> getGeneralParametersforReport(String selectedReport, Date dateFrom, Date dateTo){
		Map<String, String> parameters = new HashMap<String, String>();
		
		User user = FnpGSDelegate.findUserByUserName(securityService.getLoginedUsername());
		Client client = FnpGSDelegate.getClientById(user.getClientId());
		TTscClientCompany company = FnpGSDelegate.getCompanyByTrakheesId(client.getCTrakheesId());
		
		parameters.put("clientname",company.getCcName());
		parameters.put("clientid", company.getCcTrakheesId());
		parameters.put("licno", company.getCcLicNo());
		parameters.put("operationname", company.getCcOpName());
		parameters.put("genby",securityService.getLoginedUsername());
		
		SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");
		
		if(dateFrom!=null){
			parameters.put("datefrom",formatter.format(dateFrom));
		}else{
			parameters.put("datefrom","NA");
		}
		if(dateTo!=null){
			parameters.put("dateto",formatter.format(dateTo));
		}else{
			parameters.put("dateto","NA");
		}
		parameters.put("printdate",getCurrDate());
		
		return parameters;
	}
	
	/**
	 * @return
	 */
	private String getCurrDate(){
	  Calendar cal = new GregorianCalendar();
	  int month = cal.get(Calendar.MONTH);
	  int year = cal.get(Calendar.YEAR);
	  int day = cal.get(Calendar.DAY_OF_MONTH);
	  String currDate;
	  String strDay=""+day;
	  String strMonth=""+(month+1);
	  if(day<10){
		  strDay="0"+day;
	  }
	  if((month+1)<10){
		  strMonth="0"+(month+1); 
	  }
	  currDate =  strDay + "-" +strMonth  + "-" + year;
	  return currDate;
	}
	
	public void exportReport() throws JRException {
		// TODO Auto-generated method stub
		
	}
	public Object getParameter(JRExporterParameter arg0) {
		// TODO Auto-generated method stub
		return null;
	}
	public Map getParameters() {
		// TODO Auto-generated method stub
		return null;
	}
	public void setParameter(JRExporterParameter arg0, Object arg1) {
		// TODO Auto-generated method stub
		
	}
	public void setParameters(Map arg0) {
		// TODO Auto-generated method stub
		
	}
	



}
